# -*- coding : utf-8 -*-
# author : Big Cat
# time : 2021/7/20:22:37
# file : goodspage.py

from selenium.webdriver.common.by import By

from comm import dir_config
from base.basepage import BasePage
from pagelocation.goods_page_locs import GoodsPageLocs as LOCS

class GoodsPage(BasePage):

    def search(self,goods):
        print(self.driver,"search_____________")
        self.input(loc=LOCS.el_keyword,value=goods)
        self.click(loc=LOCS.el_search_button)
        self.sleep(3)
        self.mouse_move(loc=(By.PARTIAL_LINK_TEXT,goods))
        self.sleep(5)
        self.click(loc=LOCS.el_add_cart)
        self.sleep(5)

